package com.hmall.common.search;

import com.hmall.common.pojo.Address;
import com.hmall.common.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@FeignClient("userservice")
public interface UserClient {

    @RequestMapping("/user/{id}")
    User findUserById(@PathVariable(value = "id") Integer id);

    @GetMapping("/address/{id}")
    Address findAddressById(@PathVariable("id") Long id);
}
